package com.mtoanmy.myframework.main;

import climaxi.climaxicomic.lazyloadimage.ImageLoader;

import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer.InitiateMatchResult;
import com.mtoanmy.myframework.R;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

public class ActivityMain extends Activity {

	private Display display;
	private int width;
	private Button btn1;
	private Button btn2;
	private Button btn3;
	private Button btn4;
	private Button btn5;
	private Button btn6;
	private Button btn7;
	private Button btn8;
	private Button btn9;
	private Button btn10;
	private Button btn11;
	private ImageView a;
	private ImageLoader imageLoader;
	private Context mContext;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		display = getWindowManager().getDefaultDisplay();
		width = display.getWidth();

		mContext = this;
		
		// check layout cho moi man hinh android
		if (width < 480) {

			setContentView(R.layout.activity_main); // 320
		} else if (width < 600) {

			setContentView(R.layout.activity_main); // 480
		} else if (width < 1080) {

			setContentView(R.layout.activity_main); // 720 - tablet
		} else {

			setContentView(R.layout.activity_main); // 1080
		}
//
//		imageLoader = new ImageLoader(mContext);
		
		initData();
		initLayout();
		initEvents();
	}

	private void initEvents() {
		// TODO Auto-generated method stub

	}

	private void initLayout() {
		// TODO Auto-generated method stub
		btn1 = (Button) findViewById(R.id.btn1);
		btn2 = (Button) findViewById(R.id.btn2);
		btn3 = (Button) findViewById(R.id.btn3);
		btn4 = (Button) findViewById(R.id.btn4);
		btn5 = (Button) findViewById(R.id.btn5);
		btn6 = (Button) findViewById(R.id.btn6);
		btn7 = (Button) findViewById(R.id.btn7);
		btn8 = (Button) findViewById(R.id.btn8);
		btn9 = (Button) findViewById(R.id.btn9);
		btn10 = (Button) findViewById(R.id.btn10);
		btn11 = (Button) findViewById(R.id.btn11);
		
//		a = (ImageView)findViewById(R.id.a);
//		imageLoader.DisplayImage("http://suckhoehanhphuc.vn/UserUpload/FCKEditor/cach-giam-can-bang-cafe-1.jpg", a);
//	}
	}
	private void initData() {
		// TODO Auto-generated method stub

	}

	public OnClickListener onClickListener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch (v.getId()) {
			case R.id.btn1:
				goLoginFb();
				break;
			case R.id.btn2:
				
				break;
			case R.id.btn3:

				break;

			case R.id.btn4:

				break;

			case R.id.btn5:

				break;

			case R.id.btn6:

				break;

			case R.id.btn7:

				break;

			case R.id.btn8:

				break;

			case R.id.btn9:

				break;

			case R.id.btn10:

				break;
			default:
				break;
			}
		}

	};

	protected void goLoginFb() {
		// TODO Auto-generated method stub
		
	}

}
